home *** CD-ROM | disk | FTP | other *** search
- Path: news.deltanet.com!usenet
- From: Robert Taylor <btaylor@deltanet.com>
- Newsgroups: comp.lang.basic.visual.misc,comp.lang.c,comp.lang.c++
- Subject: Re: DLL, VB and Borland C/C++
- Date: Tue, 20 Feb 1996 22:26:09 -0800
- Organization: Delta Internet Services, Anaheim, CA
- Message-ID: <312ABB01.60D@deltanet.com>
- References: <312A0334.AC5@supaero.fr>
- NNTP-Posting-Host: ana4023.deltanet.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win95; I)
-
- Sylvain Souche wrote:
- >
- > Hi,
- >
- > I am trying desperatly to call a DLL created with Borland C/C++ 4.5 in a
- > VB 3.0 application, but VB always complains about a so called "Bad
- > Calling Convention Error". This Error message is not very documented,
- > and Borland Help files are worth nothing, so...
- >
- > If anyone know about this problem, could you tell me.
- >
- > Thanks for e-mail replies
- >
- > --
- > Sylvain Souche
- > Sylvain.Souche@supaero.fr
-
- You are probably not exporting the function correctly in the Borland C++
- DLL. I am pretty sure that VB 3.0 requires imported functions to be
- 'FAR PASCAL'.
-
- If you are not declaring the function as FAR PASCAL, it will default to
- 'CDECL'; which will cause the above mentioned error...
-
- -- Bob T.
-